package com.jy.appmarket.network.resultdata;

import com.jy.app.market.idata.Doc;
import com.jy.app.market.idata.data.Apk;

/**
 * 类说明：
 * 
 * @author kaixun.huang
 * @date 2014-5-7
 * @version 1.0
 */

public class AppDetailResultData extends BaseResultData {
	// private static final String TAG = "AppDetailResultData";
	private Apk mApk;

	public Apk getApk() {
		return mApk;
	}

	@Override
	public boolean parseResult(String result) {
		Doc doc = Doc.fromJson(result);
		if (doc == null) {
			return false;
		}
		setDataType(doc.getDataType());
		setStatus(doc.getStatus());
		setMessage(doc.getMessage());

		if (doc.isOk()) {
			if (doc.isType(Apk.class)) {
				mApk = doc.getData();
				return true;
			}
		}
		return false;
	}

}
